import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/rb-service/service/wallet/user_wallet/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {  
  return request({
    url: '/api/rb-service/service/wallet/user_wallet/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const userNoTypelist = () => {
  return request({
    url: '/api/rb-service/service/serviceinfo/service_info/list',
    method: 'get',
    params: {
      current:-1,
      size:-1,
      serviceAuditStatus:2
    }
  })
}

// 钱包--清零或划转
export const balanceRecordChange = (param) => {
  return request({
    url: '/api/rb-service/service/balancerecord/balance_record/balanceRecordChange',
    method: 'post',
    data:{
      ...param
    }
  })
}

/* 仓库 导出 */
export const getExport = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-service/service/wallet/user_wallet/export',
    method: 'get',
    params: {
      ...params,
    }
  })
}

export const getListCount = (params) => {
  return request({
    url: '/api/rb-service/service/wallet/user_wallet/statistics',
    method: 'get',
    params: {
      ...params
    }
  })
}